﻿package  
{
	import com.urbansquall.ginger.IBitmapDataLibrary;
	import flash.display.BitmapData;
	
	public class BitmapDataLibrary implements IBitmapDataLibrary
	{
		[Embed(source='../assets/foxdrop_attack_1.png')]
		public static const FOXDROP_ATTACK_1_PNG : Class;

		[Embed(source='../assets/foxdrop_dazed.png')]
		public static const FOXDROP_DAZED_PNG : Class;

		[Embed(source='../assets/foxdrop_idle.png')]
		public static const FOXDROP_IDLE_PNG: Class;
		
		[Embed(source='../assets/foxdrop_tilesheet_test.png')]
		public static const FOXDROP_TILESHEET_TEST_PNG: Class;
		
		
		public function BitmapDataLibrary() 
		{
			
		}
				
		public function lookupBitmapData( a_bitmap : String ) : BitmapData
		{
			switch( a_bitmap ) 
			{
				case "foxdrop_attack_1.png":
				return new FOXDROP_ATTACK_1_PNG().bitmapData;
				break;
				case "foxdrop_dazed.png":
				return new FOXDROP_DAZED_PNG().bitmapData;
				break;
				case "foxdrop_idle.png":
				return new FOXDROP_IDLE_PNG().bitmapData;
				break;
				case "foxdrop_tilesheet_test.png":
				return new FOXDROP_TILESHEET_TEST_PNG().bitmapData;
				break;
				default:				
				throw new Error( "Unknown asset: " + a_bitmap );
				break;
			}
		}
		
	}
	
}